package com.sandau.b230111.b23011123.repository;

import com.sandau.b230111.b23011123.model.Employee;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface EmployeeRepository extends JpaRepository<Employee,String> {

    List<Employee> findByNameAndDepartment(String name, String department);
    @Query(nativeQuery = true,value = "select * from Employee where name=?1")
    List<Employee> findByNativeQuery(String name);
}
